package miiteen.demo.web.service;

import miiteen.data.dao.BaseDao;
import miiteen.data.service.impl.BaseServiceImpl;
import miiteen.demo.web.beans.WebInfo;
import miiteen.demo.web.dao.WebInfoDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service("webInfoService")
public class WebInfoService extends BaseServiceImpl<WebInfo> {

    @Autowired
    private WebInfoDao webInfoDao;

    @Override
    protected BaseDao<WebInfo> getDao() {
        return webInfoDao;
    }

    public List<WebInfo> findBySNCode(Map<String,Object> map){
        return webInfoDao.findBySNCode(map);
    }

    public List<WebInfo> getNotice( String start, String count) {

        Map<String,Object> map=new HashMap<>();

        map.put("tableName","one");
        map.put("start",start);
        map.put("count",count);
        map.put("SNCode","TZGG");
        List<WebInfo> list = webInfoDao.findBySNCode(map);
        return list;

    }
    public List<WebInfo> getFunction( String start, String count) {

        Map<String,Object> map=new HashMap<>();

        map.put("tableName","one");
        map.put("start",start);
        map.put("count",count);
        map.put("SNCode","DTLM");
        List<WebInfo> list = webInfoDao.findBySNCode(map);
        return list;

    }


    public List<WebInfo> getDocument( String start, String count) {

        Map<String,Object> map=new HashMap<>();

        map.put("tableName","two");
        map.put("start",start);
        map.put("count",count);
        map.put("SNCode","LGFW");
        List<WebInfo> list = webInfoDao.findBySNCode(map);
        return list;

    }
    public List<WebInfo> getMinutes( String start, String count) {

        Map<String,Object> map=new HashMap<>();

        map.put("tableName","two");
        map.put("start",start);
        map.put("count",count);
        map.put("SNCode","HYJY");
        List<WebInfo> list = webInfoDao.findBySNCode(map);
        return list;

    }

    public List<WebInfo> getTrends( String start, String count) {

        Map<String,Object> map=new HashMap<>();

        map.put("tableName","three");
        map.put("start",start);
        map.put("count",count);
        map.put("SNCode","LGDT");
        List<WebInfo> list = webInfoDao.findBySNCode(map);
        return list;

    }

    public List<WebInfo> getReports(String start, String count) {

        Map<String,Object> map=new HashMap<>();

        map.put("tableName","three");
        map.put("start",start);
        map.put("count",count);
        map.put("SNCode","GZJB");
        List<WebInfo> list = webInfoDao.findBySNCode(map);
        return list;

    }
    public List<WebInfo> getNotification( String start,String count) {

        Map<String,Object> map=new HashMap<>();

        map.put("tableName","three");
        map.put("start",start);
        map.put("count",count);
        map.put("SNCode","NBQKTB");
        List<WebInfo> list = webInfoDao.findBySNCode(map);
        return list;

    }

    public List<WebInfo> getBulletin(String start, String count) {

        Map<String,Object> map=new HashMap<>();

        map.put("tableName","three");
        map.put("start",start);
        map.put("count",count);
        map.put("SNCode","TBT");
        List<WebInfo> list = webInfoDao.findBySNCode(map);
        return list;

    }
}
